Faster Algorithms for Online Topological Ordering
نویسندگان
چکیده
We present two algorithms for maintaining the topological order of a directed acyclic graph with n vertices, under an online edge insertion sequence of m edges. Efficient algorithms for online topological ordering have many applications, including online cycle detection, which is to discover the first edge that introduces a cycle under an arbitrary sequence of edge insertions in a directed graph. The current fastest algorithms for the online topological ordering problem run in time O(min(m3/2 logn,m3/2 + n2 logn)) and O(n2.75) (the latter algorithm is faster for dense graphs, i.e., when m > n11/6). In this paper we present faster algorithms for this problem. We first present a simple algorithm with running time O(n5/2) for the online topological ordering problem. This is the current fastest algorithm for this problem on dense graphs, i.e., when m > n5/3. We then present an algorithm with running time O((m+n logn) √ m), which is an improvement over the O(min(m3/2 logn,m3/2 +n2 logn)) algorithm it is a strict improvement when m is sandwiched between ω(n) and O(n4/3). Our results yield an improved upper bound of O(min(n5/2,(m+n logn) √ m)) for the online topological ordering problem.
منابع مشابه
A new approach to incremental topological ordering
Let G = (V,E) be a directed acyclic graph (dag) with n = |V | and m = |E|. We say that a total ordering ≺ on vertices V is a topological ordering if for every edge (u,v) ∈ E , we have u ≺ v. In this paper, we consider the problem of maintaining a topological ordering subject to dynamic changes to the underlying graph. That is, we begin with an empty graph G =(V, / 0) consisting of n nodes. The ...
متن کاملeb 2 00 8 Average - Case Analysis of Online Topological Ordering ∗
Many applications like pointer analysis and incremental compilation require maintaining a topological ordering of the nodes of a directed acyclic graph (DAG) under dynamic updates. All known algorithms for this problem are either only analyzed for worst-case insertion sequences or only evaluated experimentally on random DAGs. We present the first average-case analysis of online topological orde...
متن کاملAverage-Case Analysis of Online Topological Ordering
Many applications like pointer analysis and incremental compilation require maintaining a topological ordering of the nodes of a directed acyclic graph (DAG) under dynamic updates. All known algorithms for this problem are either only analyzed for worst-case insertion sequences or only evaluated experimentally on random DAGs. We present the first average-case analysis of online topological orde...
متن کاملAn O(n2.75) Algorithm for Online Topological Ordering
We present a simple algorithm which maintains the topological order of a directed acyclic graph with n nodes under an online edge insertion sequence in O(n) time, independent of the number of edges m inserted. For dense DAGs, this is an improvement over the previous best result of O(min{m 2 log n,m 3 2 + n log n}) by Katriel and Bodlaender. We also provide an empirical comparison of our algorit...
متن کاملFaster Algorithms for Incremental Topological Ordering
We present two online algorithms for maintaining a topological order of a directed acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm takes O(m) amortized time per arc and our second algorithm takes O(n/m) amortized time per arc, where n is the number of vertices and m is the total number of arcs. For sparse graphs, our O(m) bound improves the best p...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/0711.0251 شماره
صفحات -
تاریخ انتشار 2007